#ifndef _DOGE_MSG_QUEUE_H_
#define _DOGE_MSG_QUEUE_H_

#include "stdint.h"

#define DOGE_MSG_BUFFER_SIZE   20
#define DOGE_MSG_LEN           5

enum DogeQueueState {
    DOGE_QUEUE_OK = 0,
    DOGE_QUEUE_FULL = -1,
    DOGE_QUEUE_EMPTY = -2,
    DOGE_QUEUE_EINVAL = -3,
};
typedef enum DogeQueueState enDgQueStateDef;

struct DogeMsgBuffer {
    uint8_t buf[DOGE_MSG_BUFFER_SIZE];			//普通的字符串
};
typedef struct DogeMsgBuffer stDgMsgBufDef;

struct DogeMsgQueue{
	uint8_t in;
	uint8_t out;
	stDgMsgBufDef msgs[DOGE_MSG_LEN];
};
typedef struct DogeMsgQueue stDgMsgQueueDef;

enDgQueStateDef DG_MsgEnQueue(stDgMsgQueueDef *mq, uint8_t *buf, uint16_t buf_len);
enDgQueStateDef DG_UrgentMsgEnQueue(stDgMsgQueueDef *mq, uint8_t *buf, uint16_t buf_len);
enDgQueStateDef DG_MsgDequeue(stDgMsgQueueDef *mq, uint8_t *buf, uint16_t buf_len);

#endif /* _DOGE_MSG_QUEUE_H_ */